#include "Macro.h"
#include "MyDInput.h"

namespace Core
{
	namespace Devices
	{

		DInput::DInput()
		{
			HRESULT hr;
			if(FAILED(hr = DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, 
				IID_IDirectInput8, (void**)&lpdi, NULL)))
				throw(FailToInitDirectInput());
		}
		const LPDIRECTINPUT8 DInput::getDInput()
		{
			return lpdi;
		}


		DInput::~DInput(void)
		{
			SAFE_DELETE(lpdi);
		}
	}
}